<?php

namespace Yearnfar\Bundle\CmsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * post
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class post
{
    /**
     * @ORM\ManyToOne(targetEntity="app", inversedBy="posts")
     * @ORM\JoinColumn(name="aid", referencedColumnName="id")
     */
    private $app;

    /**
     * @ORM\ManyToOne(targetEntity="term", inversedBy="posts")
     * @ORM\JoinColumn(name="tid", referencedColumnName="id")
     */
    private $term;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="aid", type="integer")
     */
    private $aid;

    /**
     * @var integer
     *
     * @ORM\Column(name="tid", type="integer")
     */
    private $tid;

    /**
     * @var string
     *
     * @ORM\Column(name="author", type="string", length=60)
     */
    private $author;

    /**
     * @var string
     *
     * @ORM\Column(name="title", type="string", length=255)
     */
    private $title;

    /**
     * @var string
     *
     * @ORM\Column(name="cover", type="string", length=255)
     */
    private $cover;

    /**
     * @var string
     *
     * @ORM\Column(name="content", type="text")
     */
    private $content;

    /**
     * @var boolean
     *
     * @ORM\Column(name="publish", type="boolean")
     */
    private $publish;

    /**
     * @var integer
     *
     * @ORM\Column(name="logtime", type="integer")
     */
    private $logtime;

    /**
     * @var integer
     *
     * @ORM\Column(name="deltime", type="integer")
     */
    private $deltime;

    /**
     * @param app $app
     * @return post
     */
    public function setApp(app $app)
    {
        $this->app = $app;
        return $this;
    }

    /**
     * get app
     *
     * @return app
     */
    public function getApp()
    {
        return $this->app;
    }

    /**
     * @param term $term
     * @return post
     */
    public function setTerm(term $term)
    {
        $this->term = $term;
        return $this;
    }

    /**
     * get term
     *
     * @return mixed
     */
    public function getTerm()
    {
        return $this->term;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set aid
     *
     * @param integer $aid
     * @return post
     */
    public function setAid($aid)
    {
        $this->aid = $aid;

        return $this;
    }

    /**
     * Get aid
     *
     * @return integer
     */
    public function getAid()
    {
        return $this->aid;
    }

    /**
     * Set tid
     *
     * @param integer $tid
     * @return post
     */
    public function setTid($tid)
    {
        $this->tid = $tid;

        return $this;
    }

    /**
     * Get tid
     *
     * @return integer 
     */
    public function getTid()
    {
        return $this->tid;
    }

    /**
     * Set author
     *
     * @param string $author
     * @return post
     */
    public function setAuthor($author)
    {
        $this->author = $author;

        return $this;
    }

    /**
     * Get author
     *
     * @return string 
     */
    public function getAuthor()
    {
        return $this->author;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return post
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string 
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set cover
     *
     * @param string $cover
     * @return post
     */
    public function setCover($cover)
    {
        $this->cover = $cover;

        return $this;
    }

    /**
     * Get cover
     *
     * @return string
     */
    public function getCover()
    {
        return $this->cover;
    }

    /**
     * Set content
     *
     * @param string $content
     * @return post
     */
    public function setContent($content)
    {
        $this->content = $content;

        return $this;
    }

    /**
     * Get content
     *
     * @return string 
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set publish
     *
     * @param boolean $publish
     * @return post
     */
    public function setPublish($publish)
    {
        $this->publish = $publish;

        return $this;
    }

    /**
     * Get publish
     *
     * @return boolean 
     */
    public function getPublish()
    {
        return $this->publish;
    }

    /**
     * Set logtime
     *
     * @param integer $logtime
     * @return post
     */
    public function setLogtime($logtime)
    {
        $this->logtime = $logtime;

        return $this;
    }

    /**
     * Get logtime
     *
     * @return integer 
     */
    public function getLogtime()
    {
        return $this->logtime;
    }

    /**
     * Set deltime
     *
     * @param integer $deltime
     * @return post
     */
    public function setDeltime($deltime)
    {
        $this->deltime = $deltime;

        return $this;
    }

    /**
     * Get deltime
     *
     * @return integer 
     */
    public function getDeltime()
    {
        return $this->deltime;
    }

}
